<!DOCTYPE html>
<html lang="en" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity5">
<head>
    <meta charset="UTF-8">
    <title>index</title>
</head>
<body>
this is the index page.
<span>
    <span>登录账号：<span sec:authentication="name"></span></span><br>
<!--    <span>登录账号：<span sec:authentication="principal.name"></span>-->
    <span>凭证：<span sec:authentication="credentials"></span></span><br>
    <span>权限和角色：<span sec:authentication="authorities"></span></span><br>
    <span>客户端地址：<span sec:authentication="details.remoteAddress"></span></span><br>
    <span>sessionId：<span sec:authentication="details.sessionId"></span><br></span>
</span><br>
<button sec:authorize="hasRole('abc')">新增</button><br>
<button sec:authorize="hasRole('abc')">删除</button><br>
<button sec:authorize="hasRole('save')">保存</button><br>
<button sec:authorize="hasRole('view')">查看</button><br>
<a href="/logout">logout</a>
</body>
</html>